<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link href="/css/foot.css" type="text/css" rel="stylesheet" />
    <%@ include file="/jsp/common/js.jsp"%>

    <script>
        $(function () {
            document.onkeydown = function (event) {
                var e = event || window.event || arguments.callee.caller.arguments[0];
                if (e && e.keyCode == 13) {
                    login();
                }
            };
        });

        function login(){
            if($('#name').val()==''){
                $('#message').html('用户名不能为空!');
                return;
            }
            if($('#password').val()==''){
                $('#message').html('密码名不能为空!');
                return;
            }
            var url = '<%=request.getContextPath()%>/devops/account/login';
            var data = {name:$('#name').val(),password:$('#password').val()};
            JSendAjax(url,data);
        }

        function JCollBack(_data){
            if(_data.success){
                //验证成功后判断是否为初始密码，如果则修改密码
                if($('#password').val() == '123456'){
                    alert("密码为初始密码，请修改后再次登录！")
                    window.location = '<%=request.getContextPath()%>/devops/account/toChangePswd';
                    return;
                }
                window.location = '<%=request.getContextPath()%>/devops/account/portal';
                return;
            }
            $('#message').html(_data.msg);
        }
    </script>
</head>
<body class="no-subnav">
<header>
    <nav id="main-nav" class="navbar navbar-default" role="navigation">
        <div class="container">
            <div class="navbar-header">
                <img id="navbar-logo" src="" style="margin-top: 7px;">
            </div>
            <div class="collapse navbar-collapse navbar-top-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li class=""><a href="#"><span class='nav-home'></span></a></li>
                    <%if(!"live".equals(request.getParameter("env"))){ %>
                    <li class=""><a href="/king.jsp">devops</a></li>
                    <% }%>
                    <li class=""><a href="#">Pricing</a></li>
                    <li class=""><a href="#">Add-ons</a></li>
                </ul>
            </div>
        </div>
    </nav>
</header>

<section id="cloud-hosting-for-you" class="hero extra-space">
    <div class="container">
        <a href="/careers" class="home-corner-banner hidden-xs hidden-sm hidden-md" onclick="_gaq.push(['_trackEvent', 'Button', 'Careers', 'We're Hiring Index Banner']);"></a>
        <div class="row-content home-hero">
            <div class="col-sm-12">
                <div class="row">
                    <div class="col-sm-12 pad-xs">
                        <div class="row-content">
                            <div class="col-sm-8 col-sm-offset-2">
                                <p id="high-performance" class="lead text-center">开发和运维管理</p>
                            </div>
                        </div>

                        <div class="row pad-xs">
                            <div class="col-sm-6 col-sm-offset-6 col-md-5 col-md-offset-7">
                                <form action="" method="post" >
                                    <div class="form-group">
                                        <input name="name" id="name" type="text" class="form-control input-lg"  placeholder="用户名" value=""/>
                                    </div>
                                    <div class="form-group">
                                        <input name="password" id="password" type="password" class="form-control input-lg" placeholder="密码" value="">
                                    </div>
                                    <div class="form-group">
                                        <button type="button" onclick="login()" class="btn btn-blue btn-lg btn-block btn-border">登录</button>
                                    </div>
                                    <div class="form-group">
                                        <span style="color: red;font-size: 16px" id="message"></span>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</section>

<!-- 公共底部 start -->
<div id="king-foot">
    <div id="king-foot-box">
        <span class="">
            <i></i>
            <p><strong>金山云</strong><a data-code="1000043114-0" href="#" target="_blank">全球高品质云服务专家,金山集团旗下公司</a></p>
        </span>
        <span class="">
            <i></i>
            <p><strong>产品问题</strong><a data-code="1000043114-0" href="#" target="_blank">致力于打造公共、开放的云计算服务平台</a></p>
        </span>
        <span class="ued">
            <i></i>
            <p><strong>用户体验</strong><a data-code="1000043114-1" href="#" target="_blank">参与用户体验改进计划</a> &nbsp <a data-code="1000043114-1" href="#" target="_blank">整站用户调研</a></p>
        </span>
    </div>
</div>
<!-- 公共底部 end -->

</body>
</html>

